﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BPM.Entity
{
	/// <summary>
	/// 产品组装定义中的物料定义
	/// </summary>
	public class ProductAssembleDefinitionItem : BaseEntity
	{
		public ProductAssembleDefinitionItem()
		{
			this._ProductAssembleDefinition = this.CreateReference<ProductAssembleDefinition>();
			this._MaterialDefinition = this.CreateReference<MaterialDefinition>();
		}

		private ILazyEntityRef<ProductAssembleDefinition> _ProductAssembleDefinition;
		/// <summary>
		/// 所属的组装定义
		/// </summary>
		public ProductAssembleDefinition ProductAssembleDefinition
		{
			get
			{
				return this._ProductAssembleDefinition.Entity;
			}
			set
			{
				this._ProductAssembleDefinition.Entity = value;
			}
		}
		/// <summary>
		/// 所属的组装定义的Id
		/// </summary>
		public int ProductAssembleDefinitionId
		{
			get
			{
				return this._ProductAssembleDefinition.Id;
			}
			set
			{
				this._ProductAssembleDefinition.Id = value;
			}
		}

		private ILazyEntityRef<MaterialDefinition> _MaterialDefinition;
		/// <summary>
		/// 相关的物料定义
		/// </summary>
		public MaterialDefinition MaterialDefinition
		{
			get
			{
				return this._MaterialDefinition.Entity;
			}
			set
			{
				this._MaterialDefinition.Entity = value;
			}
		}
		/// <summary>
		/// 相关物料定义的Id
		/// </summary>
		public int MaterialDefinitionId
		{
			get
			{
				return this._MaterialDefinition.Id;
			}
			set
			{
				this._MaterialDefinition.Id = value;
			}
		}

		/// <summary>
		/// 需要物料的个数
		/// </summary>
		public int Amount { get; set; }
	}
}
